package flst.ipiweb.service;

import flst.ipiweb.persistance.dao.DAOFactory;
import flst.ipiweb.transverse.Commande;
import flst.ipiweb.transverse.IPIException;
import flst.ipiweb.transverse.Status;

public class ServiceCommande {

	  public void envoyerCommande(Commande commande) throws IPIException {
		  commande.setStatut(Status.valueOf("sending"));
		  DAOFactory.getInstance().getCommandeDao().updateCommandeStatus(commande);
	  }

	  public Commande rechercherCommande(String numCommande) throws IPIException {
		 return DAOFactory.getInstance().getCommandeDao().RechercheCommande(numCommande);
	  }
}
